package com.atguigu.gulimail.product.service;

import com.atguigu.gulimail.product.vo.Catalog2Vo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimail.product.entity.CategoryEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author tianchao
 * @email 455433520@qq.com
 * @date 2020-05-30 11:36:33
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 树形结构
     * @return
     */
    List<CategoryEntity> listWithTree();

    /**
     * 删除节点
     * @param asList
     */
    void removeMenuByIds(List<Long> asList);

    /**
     * 获取分类的路径
     * @param catelogId
     * @return
     */
    Long[] findCatelogPath(Long catelogId);

    /**
     * 级联更新
     * @param category
     */
    void updateCascadeById(CategoryEntity category);

    List<CategoryEntity> getLevel1Categories();

    Map<String, List<Catalog2Vo>>  getCatalogJson();
}

